﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using SmartPatientCentre.Repositories;
using SmartPatientCentre.Common;

namespace SmartPatientCentreUnitTests
{
    [TestClass]
    public class UnitTestSodium
    {
        //public ResultRepository mockResultList;

        //[TestInitialize]
        //public void TestInitialiser()
        //{
        //    mockResultList = new ResultRepository();
        //}

        [TestMethod]
        public void TestSodiumNormalValues()
        {
            // Values within normal range will return true

            decimal value1 = 135;
            decimal value2 = 145;
            decimal value3 = 140;
            decimal value4 = 139.5M;

            Assert.AreEqual(true, Sodium.NormalRange(value1));
            Assert.AreEqual(true, Sodium.NormalRange(value2));
            Assert.AreEqual(true, Sodium.NormalRange(value3));
            Assert.AreEqual(true, Sodium.NormalRange(value4));
        }

        [TestMethod]
        public void TestSodiumAbnormalValues()
        {
            // Values outside normal range will return false

            decimal value1 = 134.5M;
            decimal value2 = 145.5M;
            decimal value3 = 149;
            decimal value4 = 123;

            Assert.AreEqual(false, Sodium.NormalRange(value1));
            Assert.AreEqual(false, Sodium.NormalRange(value2));
            Assert.AreEqual(false, Sodium.NormalRange(value3));
            Assert.AreEqual(false, Sodium.NormalRange(value4));
        }
    }
}
